import Vue from 'vue'
import '@babel/polyfill';
import App from './App.vue'
import { createRouter } from './router/index.js'
import { createStore } from './store'

// Element UI 全局
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);


Vue.config.productionTip = false

import 'animate.css' // 动画库

// 全局函数
import util from './utils/util'
Vue.use(util);

// 全局变量
import variables from './utils/variables'
Vue.use(variables)

// 重置css 样式
import 'normalize.css/normalize.css'

 // 全局样式
import '@/styles/app.scss'



export function createApp () {
  const router = createRouter()
  const store = createStore()
  const app = new Vue({
    router,
    store,
    render: h => h(App)
  })
  return { app, router }
}
